<script setup>
// 有1个按钮的提示页面,包括成功提交,重复提交,提交失败,反馈
import { check } from '@/apis/testAPI';

check().then(res=>{
    if(res.data.code==1200){
    //如果用户没有登录，指向动态登录界面
    var a = document.createElement('a');
    a.setAttribute('href', 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxdadd0122365919e8&scope=snsapi_userinfo&response_type=code&redirect_uri=http://175.178.62.164:61803/wxuser/getSignUpUserInfo?url=/feedBack-R&expires_in=3600#wechat_redirect');
    a.setAttribute('target', '_blank');
    a.setAttribute('id', 'redict');
// 防止反复添加
    if(document.getElementById('redict')) {
	    document.body.removeChild(document.getElementById('redict'));
    }
    document.body.appendChild(a);
    a.click();
    }
}).catch(err=>{
    console.log(err);
})
</script>

<template>
    <div class="box">
        <div class="main_box">
            <div class="box1">
                <svg class="icon" aria-hidden="true"><use xlink:href="#icon-beishang"></use></svg>
                <p class="p1">已拒绝</p>
                <p>期待与小伙伴的下次见面</p>
                <van-button size="normal" round="" plain="" type="success" class="van-b" to='/index'>完成</van-button>
            </div>
        </div>
    </div>
</template>

<style scoped>
.box{
    background-color: #f7fcff;
    height: 100vh;
}
.main_box{
    position: relative;
    top: 200px;
}
.box1{
    width: 300px;
    margin:0 0 20px 40px;
}
p{  
    padding:0 30px 0 30px;
    position: relative;
    margin: 0;
    font-size: 25px;
    text-align: center;
}
.p1{
    padding: 0 30px 0 30px;
}
.icon {
  width: 12em;
  height: 4em;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
  padding-left:55px;
}
.van-b{
    margin-top:15px;
    position: relative;
    left: 25%;
    color: white;
    width: 50%;
    border: 0;
    background-color: #749ff7;
}
</style>